This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2000-374616, filed Dec. 8, 2000, the entire contents of which are incorporated herein by reference.
The present invention relates to a disk array system of a RAID structure (RAID: Redundant Arrays of Inexpensive Disks). More specifically, the present invention relates to a method which regenerates data stored in a disk array and which is suitable for use if a disk drive, i.e., a member of the disk array, fails.
In general, a disk array system comprises: a disk array made up of a number of disk drives, such as magnetic disk drives (hereinafter referred to as xe2x80x9cHDDxe2x80x9d); and a disk array controller for controlling access executed for each HDD of the disk array. The disk array system is used as an external storage device and has the following two features. The first feature is that the HDDs of the disk array are driven in parallel to execute a read-out/write-in operation in a distributed manner. This feature is intended to speed up an accessing operation. The second feature is related to data redundancy technology and is intended to ensure a reliable operation.
Upon the reception of write data transferred from a host computer, the disk array controller generates redundancy data, which serves as data correction information. Then, the disk array controller writes the redundancy data in one of the HDDs of the disk array. Even if one of the HDDs fails, the data stored in that HDD can be regenerated, using the redundancy data and the data stored in the other normal HDDs.
RAID technology is known as one of data redundancy techniques. RAID technology is divided into a variety of RAID levels in relation to RAID data and redundancy data. Typical RAID levels are level 3 and level 5.
According to level 3 (RAID level 3), the disk array controller divides updating data (write data) transferred from the host computer into sections, and executes an exclusive-OR operation between the divided sections of the updating data, thereby generating parity data, which is redundancy data. On the basis of this parity data, the disk array controller updates the original parity data stored in one of the HDDs. According to level 5 (RAID level 5), on the other hand, the disk array controller generates updated parity data (new parity data) by executing an exclusive-OR operation between the following three: updating data (new data) transferred from the host computer; to-be-updated data (old data) stored in an HDD area in which the updating data is to be stored; and to-be-updated parity data (old parity data) stored in another HDD area corresponding to the HDD area in which the updating data is to be stored. The disk array controller updates the original parity data, using the new parity data generated as above.
If a member HDD of the disk array fails, the disk array system of the above RAID structure regenerates data in that member HDD by executing the following procedures: First of all, the disk array controller reads data out from the HDDs other than the failed HDD. This readout operation is executed in units of one stripe, based on which the disk areas of the disk array are managed. Then, the disk array controller executes an exclusive-OR operation between the data read out from the HDDs, thereby acquiring regenerated (restored) data. The technique based on the exclusive-OR operation, namely, the technique including a data restoring technique that utilizes the matching between RAID data and parity data (redundancy data), is none other than RAID technology. Using this RAID technology, the disk array controller acquires regenerated data in units of one stripe and stores the resultant data in the HDD that is used in place of the failed HDD. The HDD used in place of the failed HDD is an HDD with which the failed HDD is reassigned; alternatively, it is a spare HDD connected to the disk array controller and assigned as an HDD replacing the failed HDD.
In the manner described above, the disk array system of the RAID structure enables regeneration of the data stored in a member HDD of the disk array even if that member HDD fails. However, the conventional disk array system regenerates data stored in all areas of the failed HDD. Since recent HDDs have an increased storage capacity, the conventional disk array system has problems in that the regeneration of data takes a lot of time.
When data regeneration is being executed, data redundancy, which is a feature of the RAID technology, may not be maintained. It follows from this that the long time required for data regeneration can lead to the failure of another HDD. If the second failure occurs, data cannot be regenerated and may be lost. To regenerate data stored in a failed HDD, it is necessary to read out data from all areas of the other HDDs. If a media trouble (a partial HDD trouble) occurs in one of the HDDs from which the data is read out, the HDDs undergo multi-failure, and data cannot be regenerated any longer. Since this gives rise to the situation wherein the entire disk array completely fails (i.e., the situation wherein data in the disk array cannot be accessed) or the situation wherein the data regeneration processing cannot be continued, the reliability of the disk array system is affected.
The disk array system reads out data from an HDD for inspection at regular intervals. Conventionally, this media inspection is intended to detect a media defect of an HDD (i.e., a sector block trouble or other partial troubles of the HDD) at an early stage and is performed for all areas of the HDD. Like the regeneration of the data stored in the failed HDD, therefore, the media inspection performed by the conventional disk array system takes a lot of time, and the reliability of the disk array system is affected.
The present invention has been conceived in consideration of the above circumstances, and is intended to improve the reliability of a disk array system by dividing the disk areas of a disk array into areas actually used by the file system of a host computer and areas not used thereby.
To achieve the above object, the first aspect of the present invention provides a method for regenerating data stored in a disk array, which determines the type of stripe if one of the disk drives of a disk array fails. Specifically, the method checks each of the stripes included in the disk areas of the disk array and determines whether each stripe is a first stripe that has a logical block used by the file system of a host computer or a second stripe that does not have a logical block used by the file system. Data is generated by the RAID technology, using only the stripes that have been determined as first stripes.
In the manner described above, the data of the failed disk drive is regenerated, using only the areas actually used by the file system. Hence, the processing time needed for data regeneration can be shortened, accordingly. Since the stripes not used by the file system do not contain effective data to be regenerated, the RAID technology does not use such stripes for data regeneration. The processing time needed for the regeneration of data can be as short as possible. As a result, the probability of multi-failure of the disk drives is reduced, and the risk of a fatal phenomenon, such as the complete failure of the disk array, can be reduced.
The second aspect of the present invention provides a method for regenerating data stored in a disk array, which reads out data from the disk drives of the disk array and detects a local defect in the disk drives. At the time of this media inspection, the method checks each of the stripes included in the disk areas of the disk array and determines whether each stripe is a first stripe or a second stripe. Media inspection, including the operation of reading out data from the disk drive, is executed with respect to only the stripes that have been determined as first stripes. If a defect is detected in this media inspection, the RAID technology regenerates data representing the location where the defect is detected.
In the manner described above, only the stripes used in the file system are extracted for media inspection. Hence, the processing time needed for this inspection can be shortened. Since the shortened media inspection time leads to early detection of a media defect, the reliability of the disk drives is improved. As a result, the reliability of the disk array system is also improved.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.